﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Persons List
</asp:Content>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <%= Html.Encode(ViewData["Message"]) %></h2>
    <p>
        <%
            IList<Start.Models.Person> persons = ViewData["Persons"]
                as IList<Start.Models.Person>;
            if (persons != null)
            {
        %>
        <ul>
            <% foreach (Start.Models.Person person in persons)
               { %>
            <li><a href="/person/<%= Html.Encode(person.ID) %>">
                <%= Html.Encode(person.Name) %></a></li>
            <% } %>
        </ul>
        <% } %>
    </p>
</asp:Content>
